<?php

namespace App\Http\Requests;

class LoginRequest extends BasicRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, mixed>
     */
    public function rules()
    {
        return [
            'username' => 'required',
            'pwd' => 'required',
            'captcha' => 'required',
            'ck' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'username.required' => __('message.required',[
                'p' => __('key.name')
            ]),
            'pwd.required' =>  __('message.required',[
                'p' => __('key.pwd')
            ]),
            'captcha.required' => __('message.required',[
                'p' => __('key.captcha')
            ]),
            'ck.required' => __('message.required',[
                'p' => __('key.key')
            ])
        ];
    }

}
